<template>
  <!-- 审计署统计报表-01表 -->
  <j-modal
    :title="'报表上报'"
    :width="800"
    :visible="visible"
    :maskClosable="false"
    :ok-button-props="{ props: { disabled: disableSubmit } }"
    :fullscreen="true"
    @close="close"
    cancelText="关闭"
  >
    <template slot="footer">
      <a-button key="back" style="padding-left: 8px; padding-right: 8px" @click="close(false)"> 关闭 </a-button>
      <a-popconfirm :disabled="disableSubmit" title="确定保存吗?" @confirm="() => savePlan()">
        <a-button key="save" style="padding-left: 8px; padding-right: 8px; margin-left: 8px" :disabled="disableSubmit">
          保存
        </a-button>
      </a-popconfirm>
      <a-button
        key="submit"
        type="primary"
        style="padding-left: 8px; padding-right: 8px; margin-left: 8px"
        :disabled="disableSubmit"
        @click="close(true)"
      >
        提交审批
      </a-button>
      <!-- <a-button
        key="audit"
        type="primary"
        style="padding-left: 8px; padding-right: 8px"
        @click="checkAuditResult"
      >
        审批日志
      </a-button> -->
    </template>
    <a-spin :spinning="Loading">
      <div :class="{ isCheck: isCheck }">
        <div class="table-header table-header-filx">
          <div class="table-side-title">
            {{ title }}
          </div>
          <div>
            <span class="table-title">填报单位：</span>{{ model.departName }}
            <span class="table-title">审计负责人：</span>{{ model.auditPersonName }}
            <span class="table-title">填表人：</span>{{ model.createByText }} <span class="table-title">填表时间：</span
            >{{ model.createTime }}
            <span class="table-title">统计时间：</span>
            {{ model.year }}年（{{ model.quarter }}季度）
          </div>
          <a-form-model
            class="table-title"
            style="width: 465px"
            :label-col="labelCol"
            :wrapper-col="wrapperCol"
            ref="form1"
            :rules="validatorRules1"
            :model="tableHeard"
          >
            <a-form-model-item :label="`表    号:`" prop="bh" >
              <a-input v-if="!disableSubmit" v-model="tableHeard.bh" :disabled="disableSubmit" placeholder="请输入表号"></a-input>
              <span v-else >{{tableHeard.bh}}</span>
            </a-form-model-item>
            <a-form-model-item label="制定机关：" prop="zdjg" >
              <a-input
              v-if="!disableSubmit" v-model="tableHeard.zdjg" :disabled="disableSubmit" placeholder="请输入制定机关"></a-input>
              <span v-else >{{tableHeard.zdjg}}</span>
            </a-form-model-item>
            <a-form-model-item label="批准机关：" prop="pzjg">
              <a-input v-if="!disableSubmit" v-model="tableHeard.pzjg" :disabled="disableSubmit" placeholder="请输入批准机关"></a-input>
              <span v-else >{{tableHeard.pzjg}}</span>
            </a-form-model-item>
            <a-form-model-item label="批准文号：" prop="pzwh" >
              <a-input
              v-if="!disableSubmit" v-model="tableHeard.pzwh" :disabled="disableSubmit" placeholder="请输入批准文号"></a-input>
              <span v-else >{{tableHeard.pzwh}}</span>
            </a-form-model-item>
            <a-form-model-item label="有效期至：" prop="yxq" >
              <a-month-picker
              v-if="!disableSubmit"
                placeholder="请输入有效期至"
                value-format="YYYY-MM"
                :disabled="disableSubmit"
                style="width: 100%"
                format="YYYY-MM"
                v-model="tableHeard.yxq"
              />
              <span v-else >{{tableHeard.yxq}}</span>
            </a-form-model-item>
          </a-form-model>
        </div>
        <a-form-model ref="form" :rules="validatorRules" :model="tableSource">
          <table class="table table-striped table-bordered" align="center" valign="center">
            <tr style="text-align: center">
              <td class="column title" colspan="9">一、单位基本情况</td>
            </tr>
            <tr>
              <td class="column" rowspan="3">010101</td>
              <td class="column redSatr item-required" colspan="2">统一社会信用信息</td>
              <td class="value" colspan="2">
                <a-form-model-item label="" prop="tyshxydm">
                  <a-input
                    v-model="tableSource.tyshxydm"
                    :disabled="disableSubmit"
                    placeholder="请输入统一社会信用信息"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td class="column" rowspan="3" colspan="1">010102</td>
              <td class="column item-required" rowspan="3">单位详细名称</td>
              <td class="value" rowspan="3">
                <a-form-model-item label="" prop="dwxxmc">
                  <a-input
                    v-model="tableSource.dwxxmc"
                    :disabled="disableSubmit"
                    placeholder="请输入单位详细名称"
                  ></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td class="column item-required" colspan="4">尚未领取统一社会信用代码的填写原组织机构代码</td>
            </tr>
            <tr>
              <td class="value" colspan="4">
                <a-form-model-item label="" prop="yzzjgdm">
                  <a-input
                    v-model="tableSource.yzzjgdm"
                    :disabled="disableSubmit"
                    placeholder="请输入尚未领取统一社会信用代码的填写原组织机构代码"
                  ></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td class="column" rowspan="5">010103</td>
              <td class="column item-required" colspan="2">机构类型</td>
              <td class="value" colspan="3">
                <a-form-model-item label="" prop="organizationType">
                  <j-dict-select-tag
                    :disabled="disableSubmit"
                    v-model="tableSource.organizationType"
                    style="width: 100%"
                    placeholder="请选择机构类型"
                    dict-code="organization_type"
                  />
                </a-form-model-item>
              </td>
              <td class="column" colspan="3"></td>
            </tr>
            <tr>
              <td class="column" colspan="8">行业类别</td>
            </tr>
            <tr>
              <td class="column" colspan="8">主要业务活动</td>
            </tr>
            <tr>
              <td class="column">1</td>
              <td class="value">
                <a-form-model-item label="" prop="zyywhd1">
                  <a-input v-model="tableSource.zyywhd1" :disabled="disableSubmit" placeholder="请输入"></a-input>
                </a-form-model-item>
              </td>
              <td class="column">2</td>
              <td class="value">
                <a-form-model-item label="" prop="zyywhd2">
                  <a-input v-model="tableSource.zyywhd2" :disabled="disableSubmit" placeholder="请输入"></a-input>
                </a-form-model-item>
              </td>
              <td class="column">3</td>
              <td class="value">
                <a-form-model-item label="" prop="zyywhd3">
                  <a-input v-model="tableSource.zyywhd3" :disabled="disableSubmit" placeholder="请输入"></a-input>
                </a-form-model-item>
              </td>
              <td class="column" colspan="2"></td>
            </tr>
            <tr>
              <td class="column item-required" colspan="3">行业代码（GB/T 4754-2017）</td>
              <td class="value" colspan="5">
                <a-form-model-item label="" prop="hydm">
                  <a-input
                    v-model="tableSource.hydm"
                    :disabled="disableSubmit"
                    placeholder="请输入行业代码（GB/T 4754-2017）"
                  ></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td rowspan="5" class="column">010104</td>
              <td colspan="8" class="column item-required">单位注册地及区划</td>
            </tr>
            <tr>
              <td class="value">
                <a-form-model-item label="" prop="province">
                  <a-input
                    v-model="tableSource.province"
                    :disabled="disableSubmit"
                    placeholder="请输入省（自治区、直辖市）"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td class="column item-required">省（自治区、直辖市）</td>
              <td class="value">
                <a-form-model-item label="" prop="city">
                  <a-input
                    v-model="tableSource.city"
                    :disabled="disableSubmit"
                    placeholder="请输入地（区、市、州、盟）"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td class="column item-required">地（区、市、州、盟）</td>
              <td class="value">
                <a-form-model-item label="" prop="county">
                  <a-input
                    v-model="tableSource.county"
                    :disabled="disableSubmit"
                    placeholder="请输入县（区、市、旗）"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td class="column item-required">县（区、市、旗）</td>
              <td class="column" colspan="2"></td>
            </tr>
            <tr>
              <td class="value">
                <a-form-model-item label="" prop="town">
                  <a-input v-model="tableSource.town" :disabled="disableSubmit" placeholder="请输入乡（镇）"></a-input>
                </a-form-model-item>
              </td>
              <td class="column item-required" colspan="2">乡（镇）</td>
              <td class="value" colspan="2">
                <a-form-model-item label="" prop="village">
                  <a-input
                    v-model="tableSource.village"
                    :disabled="disableSubmit"
                    placeholder="请输入街（村）、门牌号"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td class="column item-required" colspan="3">街（村）、门牌号</td>
            </tr>
            <tr>
              <td class="column item-required" colspan="1">注册地位于</td>
              <td class="value" colspan="2">
                <a-form-model-item label="" prop="jdbsc">
                  <a-input
                    v-model="tableSource.jdbsc"
                    :disabled="disableSubmit"
                    placeholder="请输入街道办事处"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td class="column item-required" colspan="1">街道办事处</td>
              <td class="value" colspan="2">
                <a-form-model-item label="" prop="sqjwh">
                  <a-input
                    v-model="tableSource.sqjwh"
                    :disabled="disableSubmit"
                    placeholder="请输入社区（居委会）"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td class="column item-required" colspan="2">社区（居委会）</td>
            </tr>
            <tr>
              <td class="column item-required" colspan="1">区域代码</td>
              <td class="value" colspan="3">
                <a-form-model-item label="" prop="qydm">
                  <a-input v-model="tableSource.qydm" :disabled="disableSubmit" placeholder="请输入区域代码"></a-input>
                </a-form-model-item>
              </td>
              <td class="column item-required" colspan="1">城乡代码</td>
              <td class="value" colspan="3">
                <a-form-model-item label="" prop="cxdm">
                  <a-input v-model="tableSource.cxdm" :disabled="disableSubmit" placeholder="请输入城乡代码"></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td rowspan="1" class="column">010105</td>
              <td colspan="1" class="column item-required">单位规模</td>
              <td class="value" colspan="2">
                <a-form-model-item label="" prop="dwgm">
                  <j-dict-select-tag
                    v-model="tableSource.dwgm"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择单位规模"
                    dict-code="sys_office_dwgm"
                  />
                </a-form-model-item>
              </td>
              <td colspan="5" class="column item-required">1 大型 2 中型 3 小型 4 微型</td>
            </tr>
            <tr>
              <td rowspan="1" class="column">010106</td>
              <td colspan="3" class="column">从业人员</td>
              <td class="column item-required" colspan="2">从业人员期末人数</td>
              <td class="value" colspan="1">
                <a-form-model-item label="" prop="cyrs">
                  <a-input-number
                    v-model="tableSource.cyrs"
                    placeholder="请输入从业人员期末人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td colspan="5" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" class="column">010107</td>
              <td rowspan="1" colspan="2" class="column item-required">法定代表人（单位主要负责人）</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="leader">
                  <a-input
                    v-model="tableSource.leader"
                    :disabled="disableSubmit"
                    placeholder="请输入法定代表人（单位主要负责人）"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="1" class="column">010108</td>
              <td rowspan="1" colspan="1" class="column item-required">执行会计标准类别</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="kjzelb">
                  <j-dict-select-tag
                    v-model="tableSource.kjzelb"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择执行会计标准类别"
                    dict-code="zxkjbzlb"
                  />
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td rowspan="4" class="column">010109</td>
              <td rowspan="1" colspan="3" class="column">联系方式</td>
              <td rowspan="2" colspan="1" class="column item-required">电子邮箱</td>
              <td rowspan="2" class="value" colspan="4">
                <a-form-model-item label="" prop="email">
                  <a-input v-model="tableSource.email" :disabled="disableSubmit" placeholder="请输入电子邮箱"></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1" class="column item-required">长途区号</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="ctqh">
                  <a-input v-model="tableSource.ctqh" :disabled="disableSubmit" placeholder="请输入长途区号"></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1" class="column item-required">固定电话</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="gddh">
                  <a-input v-model="tableSource.gddh" :disabled="disableSubmit" placeholder="请输入固定电话"></a-input>
                </a-form-model-item>
              </td>
              <td rowspan="2" colspan="1" class="column item-required">网 址</td>
              <td rowspan="2" class="value" colspan="4">
                <a-form-model-item label="" prop="emailAddr">
                  <a-input
                    v-model="tableSource.emailAddr"
                    :disabled="disableSubmit"
                    placeholder="请输入网 址"
                  ></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1" class="column item-required">邮政编码</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zipCode">
                  <a-input
                    v-model="tableSource.zipCode"
                    :disabled="disableSubmit"
                    placeholder="请输入邮政编码"
                  ></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr style="text-align: center">
              <td class="column title" colspan="9">二、单位组织结构情况</td>
            </tr>
            <tr>
              <td :rowspan="tableSource.issjfr == '1' ? '4' : '1'" class="column">010201</td>
              <td rowspan="1" colspan="3" class="column item-required">本法人单位是否有上一级法人</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="issjfr">
                  <j-dict-select-tag
                    v-model="tableSource.issjfr"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择本法人单位是否有上一级法人"
                    dict-code="sys_yes_or_no"
                  />
                </a-form-model-item>
              </td>
              <td colspan="3" class="column"></td>
            </tr>
            <tr v-if="tableSource.issjfr == '1'">
              <td rowspan="3" colspan="3" class="column">如为1，请填写</td>
              <td rowspan="1" colspan="2" class="column item-required">上一级法人单位统一社会信用代码</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="sjcredit">
                  <a-input
                    v-model="tableSource.sjcredit"
                    :disabled="disableSubmit"
                    placeholder="请输入上一级法人单位统一社会信用代码"
                  ></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr v-if="tableSource.issjfr == '1'">
              <td rowspan="1" colspan="2" class="column item-required">尚未领取统一社会信用代码的填写原组织机构代码</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="swcredit">
                  <a-input
                    v-model="tableSource.swcredit"
                    :disabled="disableSubmit"
                    placeholder="请输入尚未领取统一社会信用代码的填写原组织机构代码"
                  ></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr v-if="tableSource.issjfr == '1'">
              <td rowspan="1" colspan="2" class="column item-required">上一级法人单位单位详细名称</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="sjfr">
                  <a-input
                    v-model="tableSource.sjfr"
                    :disabled="disableSubmit"
                    placeholder="请输入上一级法人单位单位详细名称"
                  ></a-input>
                </a-form-model-item>
              </td>
            </tr>
            <tr style="text-align: center">
              <td class="column title" colspan="9">三、总审计师与内部审计机构基本情况</td>
            </tr>
            <tr>
              <td rowspan="1" class="column">010301</td>
              <td rowspan="1" colspan="3" class="column item-required">是否设置总审计师</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="isszzsjs">
                  <j-dict-select-tag
                    v-model="tableSource.isszzsjs"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择是否设置总审计师"
                    dict-code="sys_yes_or_no"
                  />
                </a-form-model-item>
              </td>
              <td class="column" colspan="2"></td>
            </tr>
            <tr>
              <td rowspan="1" class="column">010302</td>
              <td rowspan="1" colspan="3" class="column item-required">总审计师职位层级</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="zsjszwcj">
                  <j-dict-select-tag
                    v-model="tableSource.zsjszwcj"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择总审计师职位层级"
                    dict-code="sys_office_zsjzw"
                  />
                </a-form-model-item>
              </td>
              <td class="column" colspan="2"></td>
            </tr>
            <tr>
              <td rowspan="1" class="column">010303</td>
              <td rowspan="1" colspan="3" class="column item-required">总审计师任职方式</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="zsjsrzfs">
                  <j-dict-select-tag
                    v-model="tableSource.zsjsrzfs"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择总审计师任职方式"
                    dict-code="sys_office_zsjrz"
                  />
                </a-form-model-item>
              </td>
              <td class="column" colspan="2"></td>
            </tr>
            <tr>
              <td rowspan="2" class="column">010304</td>
              <td rowspan="1" colspan="3" class="column item-required">是否设置内部审计机构</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="issznbsjjg">
                  <j-dict-select-tag
                    v-model="tableSource.issznbsjjg"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择是否设置内部审计机构"
                    dict-code="sys_yes_or_no"
                  />
                </a-form-model-item>
              </td>
              <td class="column" colspan="2"></td>
            </tr>
            <tr>
              <td rowspan="1" colspan="3" class="column item-required">内部审计机构名称</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="nbshjgmc">
                  <a-input
                    v-model="tableSource.nbshjgmc"
                    :disabled="disableSubmit"
                    placeholder="请输入内部审计机构名称"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td class="column" colspan="2"></td>
            </tr>
            <tr>
              <td rowspan="1" class="column">010305</td>
              <td rowspan="1" colspan="3" class="column item-required">内部审计工作的领导机构</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="nbsjgzdldjg">
                  <j-dict-select-tag
                    v-model="tableSource.nbsjgzdldjg"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择内部审计工作的领导机构"
                    dict-code="sys_office_nbsjld"
                  />
                </a-form-model-item>
              </td>
              <td class="column" colspan="2"></td>
            </tr>
            <tr>
              <td :rowspan="tableSource.isdlsznbsjjg == '2' ? '3' : '2'" class="column">010306</td>
              <td rowspan="1" colspan="3" class="column item-required">是否独立设置内部审计机构</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="isdlsznbsjjg">
                  <j-dict-select-tag
                    v-model="tableSource.isdlsznbsjjg"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择内部审计工作的领导机构"
                    dict-code="sys_yes_or_no"
                  />
                </a-form-model-item>
              </td>
              <td colspan="2" class="column">1:是,2:否</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="8" class="column item-required">
                如为2，则内部审计机构与以下哪些职能部门合并设置？
              </td>
            </tr>
            <tr v-if="tableSource.isdlsznbsjjg == '2'">
              <td colspan="8" class="value">
                <a-form-model-item label="" prop="znbmhbsz" class="checkbox-group-err">
                  <a-checkbox-group v-model="tableSource.znbmhbsz" :disabled="disableSubmit" style="margin-left: 15px">
                    <a-checkbox value="1">1、财务部门</a-checkbox>
                    <a-checkbox value="2">2、法务部门</a-checkbox>
                    <a-checkbox value="3">3、内部控制部门</a-checkbox>
                    <a-checkbox value="4">4、纪检部门</a-checkbox>
                    <a-checkbox value="5">5、其他部门</a-checkbox>
                  </a-checkbox-group>
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td rowspan="1" class="column">010307</td>
              <td rowspan="1" colspan="3" class="column item-required">内部审计机构层级</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="nbsjjgcj">
                  <j-dict-select-tag
                    v-model="tableSource.nbsjjgcj"
                    :disabled="disableSubmit"
                    style="width: 100%"
                    placeholder="请选择内部审计工作的领导机构"
                    dict-code="sys_office_nbsjjgcj"
                  />
                </a-form-model-item>
              </td>
              <td class="column" colspan="2"></td>
            </tr>
            <tr style="text-align: center">
              <td class="column title" colspan="9">四、内部审计人员配备基本情况</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1" class="column">010401</td>
              <td rowspan="1" colspan="1" class="column">内部审计人员数量</td>
              <td rowspan="1" colspan="1" class="column item-required">编制数</td>
              <td rowspan="1" class="value" colspan="1">
                <a-form-model-item label="" prop="bzs">
                  <a-input-number
                    v-model="tableSource.bzs"
                    placeholder="请输入编制数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="1" class="column item-required">实有人员数</td>
              <td rowspan="1" class="value" colspan="1">
                <a-form-model-item label="" prop="syrys">
                  <a-input-number
                    v-model="tableSource.syrys"
                    placeholder="请输入实有人员数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="1" class="column item-required">其中：专职人员（人）</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="qzzzryrs">
                  <a-input-number
                    v-model="tableSource.qzzzryrs"
                    placeholder="请输入其中：专职人员（人）"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td rowspan="1" class="column">010402</td>
              <td rowspan="1" colspan="5" class="column item-required">内部审计人员中拥有CIA资格的人员数</td>
              <td rowspan="1" class="value" colspan="3">
                <a-form-model-item label="" prop="ciasjrys">
                  <a-input-number
                    v-model="tableSource.ciasjrys"
                    placeholder="请输入内部审计人员中拥有CIA资格的人员数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
            </tr>
            <tr>
              <td rowspan="3" class="column">010403</td>
              <td rowspan="3" colspan="2" class="column">内部审计人员学历</td>
              <td rowspan="1" colspan="2" class="column item-required">硕士及以上</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="xlsss">
                  <a-input-number
                    v-model="tableSource.xlsss"
                    placeholder="请输入硕士及以上人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">大学本科</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="xldxbks">
                  <a-input-number
                    v-model="tableSource.xldxbks"
                    placeholder="请输入大学本科人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">大学专科及以下</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="xldxzks">
                  <a-input-number
                    v-model="tableSource.xldxzks"
                    placeholder="请输入大学专科及以下人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="4" class="column">010404</td>
              <td rowspan="4" colspan="2" class="column">内部审计人员职称</td>
              <td rowspan="1" colspan="2" class="column item-required">高级职称</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zcgjzcs">
                  <a-input-number
                    v-model="tableSource.zcgjzcs"
                    placeholder="请输入高级职称人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">中级职称</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zczjzcs">
                  <a-input-number
                    v-model="tableSource.zczjzcs"
                    placeholder="请输入中级职称人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">初级职称</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zcdjzcs">
                  <a-input-number
                    v-model="tableSource.zcdjzcs"
                    placeholder="请输入初级职称人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">无职称</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zcwzcs">
                  <a-input-number
                    v-model="tableSource.zcwzcs"
                    placeholder="请输入无职称人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>

            <tr>
              <td rowspan="3" class="column">010405</td>
              <td rowspan="3" colspan="2" class="column">内部审计人员年龄结构</td>
              <td rowspan="1" colspan="2" class="column item-required">50岁以上</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="nljgfs">
                  <a-input-number
                    v-model="tableSource.nljgfs"
                    placeholder="请输入50岁以上人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">30-50岁</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="nljgtf">
                  <a-input-number
                    v-model="tableSource.nljgtf"
                    placeholder="请输入30-50岁人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">30岁以下</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="nljgtx">
                  <a-input-number
                    v-model="tableSource.nljgtx"
                    placeholder="请输入30岁以下人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>

            <tr>
              <td rowspan="8" class="column">010406</td>
              <td rowspan="8" colspan="2" class="column">内部审计人员知识结构</td>
              <td rowspan="1" colspan="2" class="column item-required">审计</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zsjgsj">
                  <a-input-number
                    v-model="tableSource.zsjgsj"
                    placeholder="请输入审计人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">会计</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zsjgkj">
                  <a-input-number
                    v-model="tableSource.zsjgkj"
                    placeholder="请输入会计人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">经济</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zsjgjj">
                  <a-input-number
                    v-model="tableSource.zsjgjj"
                    placeholder="请输入经济人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">法律</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zsjgfl">
                  <a-input-number
                    v-model="tableSource.zsjgfl"
                    placeholder="请输入法律人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">管理</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zsjggl">
                  <a-input-number
                    v-model="tableSource.zsjggl"
                    placeholder="请输入管理人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">信息技术</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zsjgxxjs">
                  <a-input-number
                    v-model="tableSource.zsjgxxjs"
                    placeholder="请输入信息技术人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">工程</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zsjggs">
                  <a-input-number
                    v-model="tableSource.zsjggs"
                    placeholder="请输入工程人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="2" class="column item-required">其他</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="zsjgqt">
                  <a-input-number
                    v-model="tableSource.zsjgqt"
                    placeholder="请输入其他人数"
                    :disabled="disableSubmit"
                    :min="0"
                  />
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="2" class="column">人</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1" class="column item-required">统计负责人</td>
              <td rowspan="1" class="value" colspan="1">
                <a-form-model-item label="" prop="tjfzr">
                  <a-input
                    v-model="tableSource.tjfzr"
                    :disabled="disableSubmit"
                    placeholder="请输入统计负责人姓名"
                  ></a-input>
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="1" class="column item-required">联系电话</td>
              <td rowspan="1" class="value" colspan="1">
                <a-form-model-item label="" prop="tel">
                  <a-input v-model="tableSource.tel" :disabled="disableSubmit" placeholder="请输入联系电话"></a-input>
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="1" class="column item-required">填表人</td>
              <td rowspan="1" class="value" colspan="1">
                <a-form-model-item label="" prop="tbr">
                  <a-input v-model="tableSource.tbr" :disabled="disableSubmit" placeholder="请输入填表人姓名"></a-input>
                </a-form-model-item>
              </td>
              <td rowspan="1" colspan="1" class="column item-required">填报日期</td>
              <td rowspan="1" class="value" colspan="2">
                <a-form-model-item label="" prop="tbsj">
                  <a-date-picker
                    :disabled="disableSubmit"
                    style="width: 100%"
                    format="YYYY-MM-DD"
                    value-format="YYYY-MM-DD"
                    placeholder="请选择填报日期"
                    v-model="tableSource.tbsj"
                  />
                </a-form-model-item>
              </td>
            </tr>
          </table>
        </a-form-model>
      </div>
    </a-spin>

    <SelectApprove ref="approver" @submitData="Submit"></SelectApprove>
    <AssistDrawer />
  </j-modal>
</template>

<script>
import { httpAction, deleteAction, getAction, postAction } from '@/api/manage'
import SelectApprove from '../SelectApprover'
import { BbsbModelMixin1 } from './BbsbModelMixin1'
import AssistDrawer from '../../component/AssistDrawerM7.vue'
import moment from 'moment'
export default {
  name: 'ModelView7',
  mixins: [BbsbModelMixin1],
  components: { SelectApprove, AssistDrawer },
  data() {
    return {
      model: {},
      tableSource: {
        auditId: null,
      },
      tableHeard: {
        bh: '',
        zdjg: '',
        pzjg: '',
        pzwh: '',
        yxq: '',
      },
      btnStyle: 'save',
      userIds: '',
      labelCol: { span: 8 },
      wrapperCol: { span: 16 },
      type: '1',
      url: {
        list: '/sjxxzhbb/sjsbb/queryById',
        add: '/sjxxzhbb/sjsbb/add',
        edit: '/sjxxzhbb/sjsbb/edit',
        delete: '/sjxxzhbb/sjAuditInfo/remove',
        getCreatData: '/sjxxzhbb/sjsbb/queryAddReportDwById',
        submit: '/common/sjProcCommon/auditDWShen',
        auditResult: '/sjxxzhbb/sjAuditInfoLog/getLogList',
      },
      validatorRules1: {
        bh: [{ required: true, message: '请输入表号', trigger: 'blur' }],
        zdjg: [{ required: true, message: '请输入制定机关', trigger: 'blur' }],
        pzjg: [{ required: true, message: '请输入批准机关', trigger: 'blur' }],
        pzwh: [{ required: true, message: '请输入批准文号', trigger: 'blur' }],
        yxq: [{ required: true, message: '请输入有效期至', trigger: 'change' }],
      },
      validatorRules: {
        tyshxydm: [{ required: true, trigger: 'blur' }],
        yzzjgdm: [{ required: true, trigger: 'blur' }],
        dwxxmc: [{ required: true, trigger: 'blur' }],
        organizationType: [{ required: true, trigger: 'change' }],
        // zyywhd1: [{ required: true, trigger: 'blur' }],
        // zyywhd2: [{ required: true, trigger: 'blur' }],
        // zyywhd3: [{ required: true, trigger: 'blur' }],
        hydm: [{ required: true, trigger: 'blur' }],
        province: [{ required: true, trigger: 'blur' }],
        city: [{ required: true, trigger: 'blur' }],
        county: [{ required: true, trigger: 'blur' }],
        town: [{ required: true, trigger: 'blur' }],
        village: [{ required: true, trigger: 'blur' }],
        jdbsc: [{ required: true, trigger: 'blur' }],
        sqjwh: [{ required: true, trigger: 'blur' }],
        qydm: [{ required: true, trigger: 'blur' }],
        cxdm: [{ required: true, trigger: 'blur' }],
        dwgm: [{ required: true, trigger: 'change' }],
        cyrs: [{ required: true, trigger: 'blur' }],
        leader: [{ required: true, trigger: 'blur' }],
        kjzelb: [{ required: true, trigger: 'change' }],
        ctqh: [{ required: true, trigger: 'blur' }],
        gddh: [{ required: true, trigger: 'blur' }],
        zipCode: [{ required: true, trigger: 'blur' }],
        email: [{ required: true, trigger: 'blur' }],
        emailAddr: [{ required: true, trigger: 'blur' }],
        issjfr: [{ required: true, trigger: 'change' }],
        sjcredit: [{ required: true, trigger: 'blur' }],
        swcredit: [{ required: true, trigger: 'blur' }],
        sjfr: [{ required: true, trigger: 'blur' }],
        isszzsjs: [{ required: true, trigger: 'change' }],
        zsjszwcj: [{ required: true, trigger: 'change' }],
        zsjsrzfs: [{ required: true, trigger: 'change' }],
        issznbsjjg: [{ required: true, trigger: 'change' }],
        nbshjgmc: [{ required: true, trigger: 'blur' }],
        nbsjgzdldjg: [{ required: true, trigger: 'change' }],
        isdlsznbsjjg: [{ required: true, trigger: 'change' }],
        znbmhbsz: [{ required: true, trigger: 'change' }],
        nbsjjgcj: [{ required: true, trigger: 'change' }],
        bzs: [{ required: true, trigger: 'blur' }],
        syrys: [{ required: true, trigger: 'blur' }],
        qzzzryrs: [{ required: true, trigger: 'blur' }],
        ciasjrys: [{ required: true, trigger: 'blur' }],
        xlsss: [{ required: true, trigger: 'blur' }],
        xldxbks: [{ required: true, trigger: 'blur' }],
        xldxzks: [{ required: true, trigger: 'blur' }],
        zcgjzcs: [{ required: true, trigger: 'blur' }],
        zczjzcs: [{ required: true, trigger: 'blur' }],
        zcdjzcs: [{ required: true, trigger: 'blur' }],
        zcwzcs: [{ required: true, trigger: 'blur' }],
        nljgfs: [{ required: true, trigger: 'blur' }],
        nljgtf: [{ required: true, trigger: 'blur' }],
        nljgtx: [{ required: true, trigger: 'blur' }],
        zsjgsj: [{ required: true, trigger: 'blur' }],
        zsjgkj: [{ required: true, trigger: 'blur' }],
        zsjgjj: [{ required: true, trigger: 'blur' }],
        zsjgfl: [{ required: true, trigger: 'blur' }],
        zsjggl: [{ required: true, trigger: 'blur' }],
        zsjgxxjs: [{ required: true, trigger: 'blur' }],
        zsjggs: [{ required: true, trigger: 'blur' }],
        zsjgqt: [{ required: true, trigger: 'blur' }],
        tjfzr: [{ required: true, trigger: 'blur' }],
        tel: [{ required: true, trigger: 'blur', validator: this.picValidator }],
        tbr: [{ required: true, trigger: 'blur' }],
        tbsj: [{ required: true, trigger: 'change' }],
      },
      yearPickShow: false,
    }
  },
  methods: {
    check(record) {
      this.Loading = true
      this.model = Object.assign({}, record)
      this.tableSource.auditId = record.id
      this.visible = true
      this.getTableData()
    },
    picValidator(rule, value, callback) {
      let TEL_REGEXP = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/
      if (!value) {
        callback(new Error('请输入手机号'))
      } else {
        if (!TEL_REGEXP.test(value)) {
          callback(new Error('手机号格式不正确'))
        } else {
          callback()
        }
      }
    },
    edit(record) {
      this.Loading = true
      this.model = Object.assign({}, record)
      this.tableSource.auditId = record.id
      this.getTableData()
      this.visible = true
    },
    delete(record, resetTablecall) {
      deleteAction(this.url.delete, { id: record.id }).then((res) => {
        if (res.success) {
          this.$message.success(res.message)
          // 请求数据
          resetTablecall()
        } else {
          this.$message.error(res.message)
        }
      })
    },
    // 保存或提交
    Submit(style, approveId) {
      this.btnStyle = style
      this.userIds = approveId
      let params = {
        ...this.tableSource,
        ...this.tableHeard,
        userIds: approveId,
        year: this.model.year,
        quarter: this.model.quarter,
        state: 1,
        head: this.model.createBy,
      }
      let valid1, valid2
      this.$refs.form1.validate((valid) => {
        valid1 = valid
      })
      this.$refs.form.validate((valid) => {
        valid2 = valid
      })
      if (valid1 && valid2) {
        postAction(this.url.submit, params).then((res) => {
          if (res.success) {
            this.$message.success(res.message)
            this.$emit('ok')
            this.visible = false
          } else {
            this.$message.error(res.message)
          }
        })
      } else {
        this.$message.warning('请确保必填项不为空且书写正确')
        return false
      }
    },
    savePlan() {
      let valid1, valid2
      this.$refs.form1.validate((valid) => {
        valid1 = valid
      })
      this.$refs.form.validate((valid) => {
        valid2 = valid
      })
      if (valid1 && valid2) {
        if (this.tableSource.isdlsznbsjjg == '1') {
          this.tableSource.znbmhbsz = []
        }
        let params = {
          ...this.tableSource,
          ...this.tableHeard,
          year: this.model.year,
          quarter: this.model.quarter,
          officeId: this.model.officeId,
          sjType: '5',
          head: this.model.createBy,
        }
        // 如果没有auditId字段，表明是新增，如果有表明是修改
        let url = this.tableSource.auditId ? this.url.edit : this.url.add
        postAction(url, params).then((res) => {
          if (res.success) {
            //保存之后的操作
            this.$message.success(res.message)
            this.$emit('ok')
            this.visible = false
          } else {
            this.$message.error(res.message)
          }
        })
      } else {
        this.$message.warning('请确保必填项不为空')
        return false
      }
    },
    // 初始化数据
    creatReport() {
      this.tableHeard = this.$options.data().tableHeard
      getAction(this.url.getCreatData).then((res) => {
        if (res.success) {
          this.tableSource = Object.assign({}, this.tableSource, res.result)
          this.tableSource.tbsj = moment().format('YYYY-MM-DD')
          this.tableSource.tjfzr = this.model.createByText
          this.tableSource.tbr = this.model.createByText
        }
        this.Loading = false
      })
    },
    getTableData() {
      getAction(this.url.list, { auditId: this.tableSource.auditId }).then((res) => {
        if (res.success) {
          this.model.auditPersonName = res.result.tjfzr
          this.model.createByText = res.result.tbr
          this.tableHeard.bh = res.result.bh
          this.tableHeard.zdjg = res.result.zdjg
          this.tableHeard.pzjg = res.result.pzjg
          this.tableHeard.pzwh = res.result.pzwh
          this.tableHeard.yxq = res.result.yxq
          this.tableSource = Object.assign({}, this.tableSource, res.result)
        }
        this.Loading = false
      })
    },
    handlePanelChange(value) {
      this.model.tbsj = moment(value).format('YYYY-MM-DD')
      this.yearPickShow = false
      this.$refs.form.validateField('tbsj', (error) => {
        console.log(error)
      })
    },
    // 弹出日历和关闭日历的回调
    handleOpenChange(status) {
      this.yearPickShow = status
    },
  },
}
</script>
<style lang="less" scoped>
@import '../../../css/checkAndEdit.less';
.table-header {
  margin-bottom: 10px;

  .table-title {
    font-weight: bold;
    margin-left: 15px;
  }
}
.table-header-filx {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  .table-side-title {
    position: absolute;
    font-size: 34px;
    color: #666;
    font-weight: 600;
    top: calc((100% - 21px) / 2);
    left: calc((100% - 465px) / 2);
    transform: translate(-50%, -50%);
  }
}
.checkbox-group-err {
  /deep/ .has-error {
    border: 0;
    box-shadow: #f5222d 0 0 5px inset;
  }
}
</style>